<?php
require_once ("./commun/ouvre_base.php");

// ~ $link = mysqli_connect($host, $userbase, $passwd) or die('Impossible de se connecter pour récupérer niveau : ' . mysql_error());
mysql_select_db ( $db ) or die ( 'Impossible de s&#233;lectionner la base de donn&#233;es' );
// ~ mysqli_select_db($link,$db) or die('Impossible de s&#233;lectionner la base de donn&#233;es');

$id = $_SESSION ['id'];
$queryuser = "SELECT *
		FROM `users`
		WHERE `last_name` LIKE '$id';";
$resultuser = mysql_query ( $queryuser ) or die ( "Impossible de r&#233;cup&#233;rer la liste des users" . mysql_error () );
// ~ $resultuser = mysqli_query($link,$queryuser) or die ("Impossible de r&#233;cup&#233;rer la liste des users" . mysql_error());
// ~ $pwd = array();
while ( $line = mysql_fetch_array ( $resultuser ) ) {
	// ~ while($line = mysql_fetch_row($resultuser)){
	// ~ while($line = mysqli_fetch_row($resultuser)){
	// ~ array_push($pwd, $line[2]);
	// ~ array_push($pwd, $line[3]);
	$_SESSION ['acces_clinique'] = $line ['acces_clinique'];
	$_SESSION ['acces_genetique'] = $line ['acces_genetique'];
	$_SESSION ['ID_people_groupe'] = $line ['ID_people_groupe'];
}
$querygroupe = "SELECT *
	FROM `users_groupe`
	WHERE `ID_people_groupe` LIKE '" . $_SESSION ['ID_people_groupe'] . "';";
echo $queryroupe . "<br />";
$resultgroupe = mysql_query ( $querygroupe ) or die ( "Impossible de r&#233;cup&#233;rer la liste des groupes" . mysql_error () );
while ( $line = mysql_fetch_array ( $resultgroupe ) ) {
	$_SESSION ['visibility_groupe'] = intval ( $line ['visibility_groupe'] );
	$_SESSION ['modification_groupe'] = intval ( $line ['modification_groupe'] );
}

?>
